export class Communication {
    constructor(source, action, target, state, info) {
        this.source = source;
        this.action = action;
        this.target = target;
        this.state = state;
        this.info = info;
    }
    toString(){
        return JSON.stringify(this)
    }
}

export function getCom (info, action = "空", target  = "空",state = "空") {
    return new Communication("User", action, target, state, info)
}

